/*
 * 文件名: TestController.java
 * 版权: Copyright (c) 金晨数通有限公司-版权所有.
 */
package com.jacoco.hefei.maven.example.controller;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import com.jacoco.hefei.maven.example.service.DockerService;
import com.jacoco.hefei.maven.example.service.NurseService;
import com.jacoco.hefei.maven.example.vo.Order;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;

/**
 *
 * @类描述：
 *
 * @创建人：zhanghr
 *
 * @创建时间：2021年8月10日 下午8:30:39
 *
 *
 */
@Api(value = "护士站的接口",tags="护士站的接口")
@RestController
@RequestMapping("/nurs")
public class NursController {
    
    @Autowired
    NurseService dockerService;
    
    @ApiOperation(notes = "查询医嘱列表",value = "查询医嘱列表")
    @GetMapping("/getOrders")
    public List<Order> getOrders(  @RequestParam("userId") String userId){
        return  dockerService.getOrder();
    }
    @ApiOperation(notes = "查看医嘱详情",value = "查看医嘱详情")
    @GetMapping("/getOrderDetail")
    public Order getOrderDetail(  ){
        Order result =  dockerService.getOrderDetail();
        return result;
    }
    @ApiOperation(notes = "打印医嘱",value = "打印医嘱")
    @GetMapping("/printOrder")
    public Boolean printOrder(  @ModelAttribute Order order){
        
        Boolean result =  dockerService.printOrder(order);
        return result;
    }
    
    @ApiOperation(notes = "执行医嘱",value = "执行医嘱")
    @GetMapping("/doOrder")
    public Boolean doOrder(  @ModelAttribute Order order){
        
        Boolean result =  dockerService.doOrder(order);
        return result;
    }
    
}
